/**
 * 
 * If you have edited the file, please update
 * all the last-modified fields manually. Thanks!
 *
 * @last-modified by: 
 * @last-modified date: 
 * @last-modified time: 
 *
 * @author Swee Zhi
 * @date-created Sep 12, 2011    @time-created 6:57:41 PM
 *
 * @project: 
 * @module: 
 * @institution: 
 *
 */
package util.enumhelper;

import util.enumeration.Department;
import util.enumeration.Language;

public class LocalizedDepartment {

    // alphabetical order
    public static String getLocalizedDepartmentAsString(Department department, String locale) {
        String localizedDepartment = "";
        
        // en_US ENGLISH, UNITED STATES
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.ENGLISH_US))) {
            localizedDepartment = getDepartment_EN_US(department);
        }
        // en_SG ENGLISH, SINGAPORE
        else
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.ENGLISH_SINGAPORE))) {
            localizedDepartment = getDepartment_EN_SG(department);
        }
        // ms_MY MALAY, MALAYSIA
        else
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.MALAY))) {
            localizedDepartment = getDepartment_MS_MY(department);
        }
        
        // zh_CN CHINESE, CHINA
        else
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.CHINESE_CHINA))) {
            localizedDepartment = getDepartment_ZH_CN(department);
        }
        // other language...
        else {
            localizedDepartment = getDepartment_EN_US(department);
        }
        
        return localizedDepartment;
    }
    
    // simplified chinese (zh_CN)
    private static String getDepartment_ZH_CN(Department department) {
        String localizedDepartment = "";
        
        switch (department) {
            case ADVERTISING: localizedDepartment = "广告" ; break;
            case INDUSTRY_LIAISON: localizedDepartment = "业界联络"; break;
            case INFORMATION_TECHNOLOGY: localizedDepartment = "信息技术" ; break;
            case OVERSEAS_LIAISON: localizedDepartment = "海外联络"; break;
            case STATISTICAL_ANALYSIS: localizedDepartment = "统计分析" ; break;
            case TOURISM_MARKETING: localizedDepartment = "旅游市场营销"; break;
            case TOURIST_SERVICE: localizedDepartment = "旅游服务"; break;
        }
        return localizedDepartment;
    }
    
    // default (en_US)
    private static String getDepartment_EN_US(Department department) {
        String localizedDepartment = "";
        
        switch (department) {
            case ADVERTISING: localizedDepartment = "Advertising" ; break;
            case INDUSTRY_LIAISON: localizedDepartment = "Industry Liaison"; break;
            case INFORMATION_TECHNOLOGY: localizedDepartment = "Information Technology" ; break;
            case OVERSEAS_LIAISON: localizedDepartment = "Overseas Liaison"; break;
            case STATISTICAL_ANALYSIS: localizedDepartment = "Statistical Analysis" ; break;
            case TOURISM_MARKETING: localizedDepartment = "Tourism Marketing"; break;
            case TOURIST_SERVICE: localizedDepartment = "Tourist Service"; break;
        }
        return localizedDepartment;
    }
    
    // singapore english (en_SG)
    private static String getDepartment_EN_SG(Department department) {
        String localizedDepartment = "";
        
        switch (department) {
            case ADVERTISING: localizedDepartment = "Advertising" ; break;
            case INDUSTRY_LIAISON: localizedDepartment = "Industry Liaison"; break;
            case INFORMATION_TECHNOLOGY: localizedDepartment = "Information Technology" ; break;
            case OVERSEAS_LIAISON: localizedDepartment = "Overseas Liaison"; break;
            case STATISTICAL_ANALYSIS: localizedDepartment = "Statistical Analysis" ; break;
            case TOURISM_MARKETING: localizedDepartment = "Tourism Marketing"; break;
            case TOURIST_SERVICE: localizedDepartment = "Tourist Service"; break;
        }
        return localizedDepartment;
    }
    
    // bahasa malaysia (ms_MY)
    private static String getDepartment_MS_MY(Department department) {
        String localizedDepartment = "";
        
        switch (department) {
            case ADVERTISING: localizedDepartment = "Pengiklanan" ; break;
            case INDUSTRY_LIAISON: localizedDepartment = "Perhubungan Industri"; break;
            case INFORMATION_TECHNOLOGY: localizedDepartment = "Teknologi Maklumat" ; break;
            case OVERSEAS_LIAISON: localizedDepartment = "Perhubungan Luar Negara"; break;
            case STATISTICAL_ANALYSIS: localizedDepartment = "Analisis Statistik" ; break;
            case TOURISM_MARKETING: localizedDepartment = "Permasaran Pelancongan"; break;
            case TOURIST_SERVICE: localizedDepartment = "Perkhidmatan Tron"; break;
        }
        return localizedDepartment;
    }
    
    // new department for localized language template (copy and paste to use)
//    private static String getDepartment_XX_YY(Department department) {
//        String localizedDepartment = "";
//        
//        switch (department) {
//            case CHINESE: localizedDepartment = "" ; break;
//            case CANTONESE: localizedDepartment = ""; break;
//            case HAINANESE: localizedDepartment = ""; break;
//            case HAKKA: localizedDepartment = ""; break;
//            case HOKKIEN: localizedDepartment = ""; break;
//            case FUJIAN: localizedDepartment = ""; break;
//            case SHANGHAI: localizedDepartment = ""; break;
//            case TEOCHEW: localizedDepartment = ""; break;
//            case XINJIANG: localizedDepartment = ""; break;
//            case MALAY: localizedDepartment = ""; break;
//            case INDIAN: localizedDepartment = ""; break;
//            case WESTERN: localizedDepartment = ""; break;
//            case JAPANESE: localizedDepartment = ""; break;
//            case KOREAN: localizedDepartment = ""; break;
//        }
//        return localizedDepartment;
//    }
}
